package com.lantosec.hmrp.modules.category.vo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.lantosec.hmrp.core.mvc.BaseVO;
import com.lantosec.hmrp.modules.category.entity.AssetsCheckDetailed;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * <p>
 * 盘点计划明细 VO对象
 * </p>
 *
 * @author AutoCode
 * @since 2020-04-01
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel(value="AssetsCheckDetailed对象", description="盘点计划明细")
public class AssetsCheckDetailedVO extends BaseVO<AssetsCheckDetailed> {
    private static final long serialVersionUID = 1L;


    public AssetsCheckDetailedVO(AssetsCheckDetailed entity){
        this.detailedId = entity.getDetailedId();
        this.planId = entity.getPlanId();
        this.areaId = entity.getAreaId();
        this.areaName = entity.getAreaName();
        this.deptId = entity.getDeptId();
        this.deptName = entity.getDeptName();
        this.checkUserId = entity.getCheckUserId();
        this.checkUser = entity.getCheckUser();
        this.schedule = entity.getSchedule();
        this.assetsCount = entity.getAssetsCount();
        this.checkCount = entity.getCheckCount();
    }

    @Override
    public AssetsCheckDetailed convertToEntity(){
        return new AssetsCheckDetailed(this);
    }


    @ApiModelProperty(value = "盘点明细ID")
    @TableId(value = "detailed_id", type = IdType.AUTO)
    private Integer detailedId;

    @ApiModelProperty(value = "计划ID")
    private String planId;

    @ApiModelProperty(value = "资产所属区域ID")
    private String areaId;

    @ApiModelProperty(value = "资产所属区域名称")
    private String areaName;

    @ApiModelProperty(value = "资产使用部门ID")
    private String deptId;

    @ApiModelProperty(value = "资产使用部门名称")
    private String deptName;

    @ApiModelProperty(value = "盘点人ID")
    private String checkUserId;

    @ApiModelProperty(value = "盘点人")
    private String checkUser;

    @ApiModelProperty(value = "进度")
    private Double schedule;

    @TableField(exist = false)
    @ApiModelProperty(value = "资产总数")
    private Integer assetsCount;

    @TableField(exist = false)
    @ApiModelProperty(value = "已盘点总数")
    private Integer checkCount;

}
